<template>
  <el-dialog
    class="pdf-dialog"
    title="会诊单详情"
    width="750px"
    top="5vh"
    fullscreen
    append-to-body
    :visible.sync="dialogVisible"
    @close="dialogVisible = false"
    :close-on-click-modal="false"
    :close-on-press-escape="false"
  >
    <div id="content" style="height: 100%">
      <iframe
        id="consultContent"
        :src="pdfUrl"
        width="100%"
        height="100%"
        frameborder="0"
      ></iframe>
    </div>
  </el-dialog>
</template>
<script>
export default {
  props: {},
  data() {
    return {
      dialogVisible: false,
      pdfUrl: '',
    };
  },
  mounted() {},
  methods: {
    open(pdfUrl) {
      this.pdfUrl = pdfUrl;
      this.dialogVisible = true;
    },
  },
};
</script>
<style lang="scss">
.pdf-dialog {
  .el-dialog {
    width: 100% !important;
    height: 100% !important;
    max-width: initial !important;
    display: flex;
    flex-direction: column;
  }

  .el-dialog__body {
    flex-grow: 1;
    padding: 0 !important;
    overflow: hidden !important;
    max-height: initial !important;
  }
}
</style>
